<!DOCTYPE html>
<html>

<head>
   
    {include file="Public/header"}
    <link rel="stylesheet" href="__STATIC__/layout/css/demo.css" type="text/css">
    <link href="__STATIC__/layout/css/gyq.css" rel="stylesheet">
    <style>
        .row {
            margin: 0;
            padding: 0
        }

    </style>

</head>

<body class="white-bg" style="padding: 3px;font-size: 13px">
    <div class="page-heade">
       <h2 class="title_color text-center">待审批系统提醒管理</h2>
    </div>
    <form action="" class="form-inline" id="form1">
        <table class="table table-bordered">
            <tr>
                <td colspan="2">
                    <button class="btn btn-primary addAprolvalWarn">新增</button>
                </td>
            </tr>
            <tr>
                <td style="text-align: right;"><label for="Name">姓名：</label></td>
                <td><input type="text" class="form-control inputremindPeple" id="Name" name="stuff" value="{$stuff}"></td>
            </tr>
            <tr>
                <td colspan="2" style="text-align: center;">
                    <button class="btn btn-info">查询</button>
                    <button class="btn btn-info emtyif" id="reset">清空查询条件</button>
                </td>
            </tr>
        </table>
    </form>
    <table class="table table-striped table-bordered table-hover bud_hei text-center aprovalSystemTable" style="width: 100%;">
        <tr class="info">
            <th class="text-center">No.</th>
            <th class="text-center">被提醒员工</th>
            <th class="text-center">提醒方式</th>
            <th class="text-center">操作</th>
        </tr>
        <tbody>
            {volist name="data" id="row" key="k"}
            <tr>
                <td>{$k}</td>
                <td>{$row.stuff}</td>
                <td>{$row.type}</td>
                <td>
                    <a href="{:url('update',array('id'=>$row.id))}" class="xiugai">修改</a>
                    <a href="{:url('delete',array('id'=>$row.id))}" class="shanchu">删除</a>
                </td>
            </tr>
            {/volist}
        </tbody>
    </table>
     <div class="row text-center" id="pageText" style="padding: 0;margin: 0;">
			<div class="col-sm-6 text-left"><div class="padding-10 countSize">共{$count}条记录，{$maxpage}页&nbsp;&nbsp;</div></div>
			<div class="col-sm-6 text-right">{$page}</div>
	 </div>

<!-- 全局js -->
{include file="Public/footer"}
<script src="__STATIC__/layout/js/plugins/layer/layer.min.js"></script>
<script>
    $(document).ready(function () {
        $('#reset').on('click',function () {
            $("#form1 input").each(function(){
                $(this).val('');
            });
            $("#form1 select").each(function(){
                $(this).val('');
            });
            $('#form1').submit()
            return false
        })
        $(".addAprolvalWarn").click(function () {
            layer.open({
                type: 2,
                title: '&nbsp;',
                shadeClose: true,
                shade: false,
                maxmin: true, //开启最大化最小化按钮
                area: ['800px', '600px'],
                content: '{:url("add")}'
            })
            return false
        });
        $(".xiugai").click(function () {
            var link = $(this).attr('href')
            layer.open({
                type: 2,
                title: '&nbsp;',
                shadeClose: true,
                shade: false,
                maxmin: true, //开启最大化最小化按钮
                area: ['800px', '500px'],
                content: link
            })
            return false
        });
        //删除
        $('.shanchu').click(function () {
            var link = $(this).attr('href')
            swal({
                title: "您确定要删除这条信息吗",
                text: "删除后将无法恢复，请谨慎操作！",
                type: "warning",
                showCancelButton: true,
                confirmButtonColor: "#DD6B55",
                confirmButtonText: "删除",
                closeOnConfirm: false
            }, function (isConfirm) {
                if(isConfirm){
                    $.ajax({
                        'type':'post',
                        'url':link,
                        'dataType':'json',
                        'success':function (data) {
                            if(data.success){
                                location.reload()
                            }else
                                swal(data.msg, "", "error");
                        }
                    })
                }

            });
            return false
        });
    })
</script>
</body>

</html>